﻿@{
    Layout = null;
}

<!doctype html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="icon" href="dist/img/favicon-32x32.png" sizes="32x32" type="image/png">
    <link rel="icon" href="dist/img/favicon-16x16.png" sizes="16x16" type="image/png">
    <meta name="keywords" content="响应式后台模板,开源免费后台模板,bootstrap5后台管理系统模板">
    <meta name="description" content="bootstrap-admin基于bootstrap5的免费开源的响应式后台管理模板">
    <meta name="author" content="ajiho">
    <link href="~/lib/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet" />
    <link href="~/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/lib/overlayscrollbars/styles/overlayscrollbars.min.css" rel="stylesheet" />
    <link href="~/css/bootstrap-admin.css" rel="stylesheet" />
    <title>bootstrap-admin开源免费响应式后台管理系统模板</title>
</head>

<body data-theme="light">

    <!--头部导航-->
    <ul class="bsa-header">
        <!-- 侧边栏触发按钮(移动端时显示) -->
        <li class="bsa-sidebar-toggler" data-bsa-toggle="pushmenu">
            <div class="bsa-header-item">
                <i class="bi bi-list"></i>
            </div>
        </li>
        <!--  搜索组件(不需要可删除)  -->
        <li>
            <div class="bsa-header-item bsa-cursor-default">
                <!--    搜索表单包裹区域        -->
                <div class="bsa-search-form-wrapper"
                     data-bsa-toggle="navbar-search"
                     data-close-reset="false"
                     data-action="pages/search.html"
                     data-params='{"type":"article","user":"admin2"}'>
                    <div class="bsa-search-form">
                        <input type="text" class="form-control bsa-input-search" aria-label="搜索关键词"
                               placeholder="搜索关键词">
                        <button class="bsa-search-submit-btn" type="submit"><i class="bi bi-search"></i></button>
                        <button class="bsa-search-close-btn" type="button"><i class="bi bi-x-lg"></i></button>
                    </div>
                </div>
                <!--    移动端搜索表单触发器(移动端会显示)        -->
                <i class="bi bi-search bsa-search-form-toggler bsa-cursor-pointer"></i>
            </div>
        </li>
        <!--  占位(可以让后面的li居右)  -->
        <li class="flex-grow-1"></li>
        <!--  通知(如果有新消息则添加类名.bsa-has-msg)  -->
        <li>
            <div class="bsa-header-item" data-qt-tab='{"title":"消息中心","url":"pages/message.html"}'
                 data-qt-target=".qtab">
                <i class="bi bi-bell bsa-has-msg"></i>
            </div>
        </li>
        <!--  拓展菜单(建议把拓展放在此处,以免破坏头部整体布局,不需要可以直接删除)  -->
        <li class="dropdown">
            <div class="bsa-header-item" data-bs-toggle="dropdown" data-bs-auto-close="outside">
                <i class="bi bi-grid"></i>
            </div>
            <div class="dropdown-menu dropdown-menu-end p-0">
                <div class="card shadow-sm">
                    <div class="card-header d-flex justify-content-between bg-body">
                        <span class="bsa-fs-15">拓展菜单</span>
                        <a href="javascript:" class="bsa-fs-13 text-decoration-none text-body-secondary">编辑</a>
                    </div>
                    <div class="card-body">
                        <div class="container-fluid">
                            <div class="row row-cols-3 g-3">
                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary  bsa-wh-45 rounded-circle">
                                        <i class="bi bi-envelope"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">邮箱</div>
                                </a>

                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="pages/lockscreen.html">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-lock"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">锁屏</div>
                                </a>

                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-link"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">前台直达</div>
                                </a>

                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-link"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">拓展菜单4</div>
                                </a>
                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-link"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">拓展菜单5</div>
                                </a>
                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-link"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">拓展菜单6</div>
                                </a>
                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-link"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">拓展菜单7</div>
                                </a>

                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-link"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">拓展菜单8</div>
                                </a>

                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-link"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">拓展菜单9</div>
                                </a>

                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-link"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">拓展菜单10</div>
                                </a>

                                <a class="col text-decoration-none text-body-secondary d-flex flex-column align-items-center p-2 gap-1"
                                   href="javascript:">
                                    <div class="d-flex align-items-center justify-content-center bsa-fs-25 bg-body-secondary bsa-wh-45 rounded-circle">
                                        <i class="bi bi-link"></i>
                                    </div>
                                    <div class="bsa-fs-14 bsa-ellipsis-2 text-center">拓展菜单11</div>
                                </a>

                            </div>
                        </div>
                    </div>
                    <div class="card-footer text-center bg-body">
                        <a href="javascript:" class="bsa-fs-14 text-decoration-none text-body-secondary">查看更多菜单</a>
                    </div>
                </div>
            </div>
        </li>
        <!--  全屏  -->
        <li class="bsa-fullscreen-toggler">
            <div class="bsa-header-item">
                <i class="bi bi-arrows-fullscreen"></i>
            </div>
        </li>
        <!--  主题配色  -->
        <li class="dropdown">
            <div class="bsa-header-item" data-bs-toggle="dropdown" data-bs-auto-close="outside">
                <i class="bi bi-palette"></i>
            </div>
            <div class="dropdown-menu dropdown-menu-end p-0">
                <div class="card shadow-sm">
                    <div class="card-header d-flex justify-content-between bg-body">
                        <span class="bsa-fs-15">主题配色</span>
                    </div>
                    <div class="card-body">
                        <!--    配色包裹      -->
                        <div class="bsa-theme-switcher-wrapper">
                            <input class="form-check-input" type="checkbox" value="light">
                            <input class="form-check-input" type="checkbox" value="dark">
                            <input class="form-check-input" type="checkbox" value="indigo">
                            <input class="form-check-input" type="checkbox" value="green">
                            <input class="form-check-input" type="checkbox" value="blue">
                            <input class="form-check-input" type="checkbox" value="yellow">
                            <input class="form-check-input" type="checkbox" value="pink">
                            <input class="form-check-input" type="checkbox" value="red">
                            <input class="form-check-input" type="checkbox" value="orange">
                            <input class="form-check-input" type="checkbox" value="cyan">
                            <input class="form-check-input" type="checkbox" value="teal">
                        </div>
                    </div>
                </div>
            </div>
        </li>
        <!--    管理员信息    -->
        <li class="dropdown">
            <div class="bsa-header-item" data-bs-toggle="dropdown">
                <div class="bsa-user-area">
                    <img src="~/img/avatar.jpg" class="bsa-user-avatar" alt="用户头像">
                    <div class="bsa-user-details">
                        <div class="bsa-ellipsis-1 bsa-fs-15">system</div>
                        <!-- 管理员角色RBAC权限设计时可用(不需要可删除,上面的用户名可自动垂直居中)  -->
                        <div class="bsa-ellipsis-1 bsa-fs-13 text-muted">超级管理员</div>
                    </div>
                </div>
            </div>
            <ul class="dropdown-menu dropdown-menu-end">
                <li>
                    <a class="dropdown-item" href="javascript:"
                       data-qt-tab='{"title":"个人资料","url":"pages/profile.html"}'
                       data-qt-target=".qtab">
                        <i class="bi bi-person me-2"></i>个人资料
                    </a>
                </li>
                <li>
                    <a class="dropdown-item bsa-clear-cache" href="javascript:"
                       data-qt-tab='{"title":"修改密码","url":"pages/password.html"}'
                       data-qt-target=".qtab">
                        <i class="bi bi-key me-2"></i>修改密码
                    </a>
                </li>
                <li>
                    <div class="dropdown-divider"></div>
                </li>
                <li class="bsa-logout">
                    <a class="dropdown-item" href="javascript:">
                        <i class="bi bi-box-arrow-right me-2"></i>退出登录
                    </a>
                </li>
            </ul>
        </li>
    </ul>

    <!--侧边栏-->
    <div class="bsa-sidebar">
        <div class="card border-0 h-100">
            <!--  侧边栏头部(用于展示品牌logo)  -->
            <div class="card-header bg-body d-flex align-items-center flex-shrink-0">
                <img src="~/img/favicon-32x32.png" class="bsa-logo-icon" alt="logo-icon">
                <div class="bsa-logo-text ms-2 bsa-ellipsis-2">bootstrap-admin</div>
            </div>
            <!--  侧边栏身体部分(用于主要的侧边栏菜单)  -->
            <div class="card-body p-0" data-overlayscrollbars-initialize>
                <!--   侧边栏的菜单     -->
                <ul class="bsa-menu" data-bsa-toggle="sidebar" data-accordion="true" data-click-close="true">
                    <li>
                        <a href="/Home/Privacy">
                            <i class="bi bi-house"></i>首页
                        </a>
                    </li>
                    <li>
                        <a href="javascript:" class="has-children"><i class="bi bi-person-lock"></i>生成配置</a>
                        <ul>
                            <li>
                                <a href="/Project/Index">项目配置</a>
                            </li>
                            <li>
                                <a href="/Module/Index">模块配置</a>
                            </li>
                            <li>
                                <a href="/Template/Index">代码模板</a>
                            </li>
                            <li>
                                <a href="/Table/Index">代码生成</a>
                            </li>
@*                            <li>
                                <a href="pages/node.html">节点列表</a>
                            </li>*@
                        </ul>
                    </li>
                </ul>
            </div>
            <!--  侧边栏底部(用于演示,不需要可删除)  -->
            <div class="card-footer bg-body">
                Version: 2.0.1
            </div>
        </div>
    </div>

    <!--内容区域(.bsa-content-fixed类删除后即可变成单页版本)-->
    <div class="bsa-content bsa-content-fixed">
        <div class="qtab" data-qt-tabs='[{"title":"首页","url":"/Home/Privacy","close":false}]'></div>
    </div>

    <!--版权信息-->
    <div class="bsa-footer">
        <p class="mb-0">Copyright © 2023. All right reserved.</p>
    </div>

    <!--加载层-->
    <div class="bsa-preloader">
        <div class="spinner-border text-secondary" role="status">
            <span class="visually-hidden">Loading...</span>
        </div>
    </div>


    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/lib/overlayscrollbars/browser/overlayscrollbars.browser.es6.min.js"></script>
    <script src="~/lib/bootstrap-quicktab/dist/js/bootstrap-quicktab.min.js"></script>
    <script src="~/js/bootstrap-admin.js"></script>
    <script src="~/js/app.js"></script>

    <script>
        $(document).ready(function () {

          // var {
          //   OverlayScrollbars,
          //   ScrollbarsHidingPlugin,
          //   SizeObserverPlugin,
          //   ClickScrollPlugin
          // } = OverlayScrollbarsGlobal;
          // const osInstance = OverlayScrollbars(document.querySelector('body'), {});


          //头部搜索框处理(不需要可以删除,不明白的可以看bootstrap-admin官方文档)
          $(document).on('search.bsa.navbar-search', function (e, inputValue, data) {
            //先得到请求地址,组合后大概是这样pages/search.html?keyword=dsadsa&type=article&user=admin2
            let url = data.action + '?keyword=' + inputValue + '&' + $.param(data.params);

            //然后通过tab打开一个搜索结果的窗口
            Quicktab.get('.qtab').addTab({
              title: '<i class="bi bi-search"></i><span class="text-danger ms-2">' + inputValue + '</span>',
              url: url,
              close: true,
            })
          })

          //退出登录
          $(document).on('click', '.bsa-logout', function (e) {
            e.preventDefault();
            $.modal({
              body: '确定要退出吗？',
              cancelBtn: true,
              ok: function () {

                //请求退出路由
                $.ajax({
                  method: 'post',
                  url: '/logout',
                }).then(response => {

                  if (response.code === 200) {//跳转到后台首页

                    $.toasts({
                      type: 'success',
                      content: '退出成功',
                      onHidden: function () {
                        top.location.replace('/pages/login.html');
                      }
                    })
                  }
                });


              }
            })


          });
        });
    </script>
</body>
</html>

